﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Client_Web.ServiceReference;

namespace Client_Web
{
    public partial class PictureList : System.Web.UI.Page
    {
        protected List<PictureStruct> pictureList;

        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceClient serviceClient = new ServiceClient();
            string[] pictureStringList = serviceClient.getPictureList();

            pictureList = new List<PictureStruct>();
            for (int i = 1; i < pictureStringList.Length; i++)
            {
                string[] data = Util.CleanAndSplit(pictureStringList[i]);

                PictureStruct picture = new PictureStruct();
                picture.id = data[0];
                picture.name = data[1];
                pictureList.Add(picture);
            }


            Title = "Liste des images";
        }
    }
}